//
//  UpViewUtil.m
//  JWTApp
//
//  Created by chh on 16/7/6.
//  Copyright © 2016年 掘智传媒. All rights reserved.
//

#import "UpViewUtil.h"

@implementation UpViewUtil

+(void)showViewWithMessage:(NSString *)msg AndViewController:(UIViewController *)VC sure:(Sure)sure cancle:(Cancle)cancle{
    
    UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"提示" message:msg preferredStyle:UIAlertControllerStyleAlert];
    
    UIAlertAction *alertSure = [UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
        sure();
        
    }];
    
    UIAlertAction *alertCancel = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
        cancle();
    }];
    
    [alert addAction:alertSure];
    [alert addAction:alertCancel];
    
    [VC presentViewController:alert animated:YES completion:nil];

}

@end
